Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds feature metrics for collection prefs and button group #3180

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pan-kot
Copy link
Member

@pan-kot pan-kot commented Jan 10, 2025

Description

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pan-kot pan-kot requested a review from a team as a code owner January 10, 2025 11:00
@pan-kot pan-kot requested review from just-boris and removed request for a team January 10, 2025 11:00
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (67c06fa) to head (11d5861).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3180    +/-   ##
========================================
  Coverage   96.40%   96.41%            
========================================
  Files         784      784            
  Lines       22144    22155    +11     
  Branches     7191     7538   +347     
========================================
+ Hits        21349    21360    +11     
+ Misses        788      743    -45     
- Partials        7       52    +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

expect(useBaseComponent).toHaveBeenCalledWith('ButtonGroup', {
props: {
variant: 'icon',
dropdownExpandToViewport: undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be false instead? Not sure how the metrics handle undefined values here

Copy link
Member

@just-boris just-boris Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics use JSON.stringify. When you serialise undefined, it disappears completely, same as this key did not exist before.

Explicit casting is recommended

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was thinking about that too, but decided not touch it just yet. I think it would be nice to align within the team if we want to cast or not and how do we want to treat properties that have defaults: should we pass the default value or the missing one, as it directly affects the actual metrics we gather.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all other cases, we track resolved values after defaulting.

For dropdownExpandToViewport there is an implicit default false which we should be tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants